<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box-a{
            width: 0px;
            height: 0px;
            padding: 50% 0px 0px 50%;
            margin: 0px;
            position: relative;
        }
        .box-b{
            width: 100%;
            height: 100%;
            position: absolute;
            left: 0px;
            top: 0px;
            background-color: cadetblue;
        }
    </style>
</head>
<body>
    <div class="box-a">
        <div class="box-b"></div>
    </div>
</body>
</html>